package com.homedo.odin.solution.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;

/**
 * <p> 消息 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public class Message extends Model<Message> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 接收
     */
    @TableField("to_user")
    private Integer toUser;
    /**
     * 发送
     */
    @TableField("frome_user")
    private Integer fromeUser;
    /**
     * 消息类型
     */
    private String type;
    /**
     * 消息内容
     */
    private String content;

    /**
     * 标题
     */
    private String title;

    /**
     * 是否阅读 0：否 1：是
     */
    private Integer readed;
    /**
     * 阅读时间
     */
    @TableField("readed_time")
    private Date readedTime;
    /**
     * 是否删除 0：否 1：是
     */
    @TableField("is_del")
    private Integer isDel;
    /**
     * 创建人编号
     */
    @TableField("created_by")
    private Integer createdBy;
    /**
     * 创建时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createdTime;
    /**
     * 修改人编号
     */
    @TableField("modified_by")
    private Integer modifiedBy;
    /**
     * 最后修改时间
     */
    @TableField("modified_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date modifiedTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getToUser() {
        return toUser;
    }

    public void setToUser(Integer toUser) {
        this.toUser = toUser;
    }

    public Integer getFromeUser() {
        return fromeUser;
    }

    public void setFromeUser(Integer fromeUser) {
        this.fromeUser = fromeUser;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getReaded() {
        return readed;
    }

    public void setReaded(Integer readed) {
        this.readed = readed;
    }

    public Date getReadedTime() {
        return readedTime;
    }

    public void setReadedTime(Date readedTime) {
        this.readedTime = readedTime;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public Integer getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Integer getModifiedBy() {
        return modifiedBy;
    }

    public void setModifiedBy(Integer modifiedBy) {
        this.modifiedBy = modifiedBy;
    }

    public Date getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
